package com.cy.service;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.cy.entity.BackPurview;

@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public interface BackPurviewService<T> extends BaseService<T> {
	
	/**
	 * 通过DWR保存BackPurview对象
	 */
	public String saveBackPurviewDWR(BackPurview purview,Long parentId);
	
	/**
	 * 通过DWR修改BackPurview对象
	 */
	public BackPurview eidtBackPurviewDWR(BackPurview purview);
	
	/**
	 * 通过DWR逻辑删除BackPurview对象
	 */
	public void delBackPurviewDWR(Long id,boolean isParent);
	
	/**
	 * 通过级别查询权限对象list
	 */
	public List<BackPurview> listBackPurviewByLevel(Integer level);
	
	/**
	 * 为系统管理员列出所有权限
	 */
	public List<BackPurview> listAllPurviewForSysAdmin();
	
	/**
	 * 通过父级查询权限对象list
	 */
	public List<BackPurview> listBackPurviewByParent(Long parentId);

}
